<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>{% block title %}Domination Game{%endblock%}</title>
    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
    <link rel="stylesheet" href="/static/theme/codemirror.css" type="text/css" media="screen" title="no title" charset="utf-8">
    <link rel="stylesheet" href="/static/theme/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
    
    <script src="/static/javascript/mootools-core-1.4.2-full.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/javascript/mootools-more-1.4.0.1.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/javascript/openid.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/javascript/codemirror.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
		window.addEvent('domready', function(){
			//Activate pills
			$$('.tabs').each(function(ul){
				var all_pills = ul.getElements('li');
				var all_inside = $$(ul.getElements('li a').get('href').join(','));
				all_inside.setStyle('display','none')
				ul.getElements('li').each(function(li){
					li.addEvent('click', function(e){
						all_inside.setStyle('display','none');
						all_pills.removeClass('active');
						$$(this.getElement('a').get('href')).setStyle('display','block');
						this.addClass('active');
					}.bind(li));
				});
				$$(ul.getElement('li.active a').get('href')).setStyle('display','block');
			});
			
			$$('.alert-message .close').each(function(closebtn){
				closebtn.addEvent('click', function(e){
					this.getParent().destroy();
				})
			});
		})
	</script>
</head>

<body>
	<div class='topbar'>
		<div class='fill'>
		    <div class="container">
				<h3><a href='/'>{% block headertext %}{% endblock %}</a></h3>
				<ul class="nav secondary-nav">
				{% if user %}
					{% if group and user.is_admin %}<li><a href='{% url dominationgame.views.settings group.slug %}'>Admin Settings</a></li>{%endif%} 
					{% if user.current_team %} 
						<li><a href='{% url dominationgame.views.dashboard user.current_team.group.slug %}'>Dashboard</a></li>{% endif %}
					<li><a href='{{user.logout_url}}'>Logout ({{user.nickname}})</a></li>
				{% else %}
					<li><a href='/login'>Login</a></li>
				{% endif %}
				</ul>
			</div>
		</div>
	</div>
	<div class='container'>
		{% for message in messages %}
			<div class='alert-message {{message.0}}'><a class="close" href="#">×</a>{{message.1}}</div>
		{% endfor %}
    {% block content %}

    Dit is de base template.
    
    {% endblock content %}
    
    </div>

    <div id="footer">
    </div>

</body>

</html>